<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe632;</span>
      输入城市/景点/游玩/主题
    </div>
    <router-link to="/city">
      <div class="header-right">{{this.city}} <span class="iconfont arrow-icon">&#xe62d;</span></div>
    </router-link>
  </div>
</template>

<script>
  import {mapState} from 'vuex'

  export default {
    name: "HomeHeader",
    computed:{
      ...mapState(['city'])
    }
  }
</script>
<style lang="less" scoped>
  @import "~styles/z.less";
  @import "~styles/varible.less";

  .header {
    .flex;
    .bgcolor(@bgcolor);
    align-items: center;
    color: white;
    line-height: @headerHeight;
    .header-left {
      width: 0.64rem;
      .fl;
      .back-icon {
        text-align: center;
        .font-s(0.4rem);
      }
    }
    .header-right {
      min-width: 1.04rem;
      padding: 0 0.1rem;
      .fr;
      color: #fff;
      .arrow-icon {
        .font-s(0.2rem);
        margin-left: -0.04rem;
      }
    }
    .header-input {
      flex: 1;
      .bgcolor(white);
      border-radius: 0.1rem;
      margin: 0.12rem 0.2rem;
      height: 0.64rem;
      color: #ccc;
      line-height: 0.64rem;
      padding-left: 0.2rem;
    }
  }
</style>
